//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    city: "",
    logo: true,
    banner:[
      { url:'/images/banner_02.png'}
    ],
    qiangche: [
      {
        motto1: '西安比邻网络刚完成了订单',
        motto2: '招聘小程序订单量已突破3000单',
      },
      {
        motto1: '西安比邻网络刚完成了订单1',
        motto2: '招聘小程序订单量已突破3000单2',
      },
      {
        motto1: '西安比邻网络刚完成了订单3',
        motto2: '招聘小程序订单量已突破3000单4',
      },
    ], 
    indicatorDots: true,
    autoplay: true,
    interval: 5000,
    duration: 500
  },
  start_new(e) {
    var id = e.currentTarget.dataset.id;
    app.navTo('../new/new?id' + id)
  },
  //搜索
  start_talent(){
    app.navTo('../talent/talent')
  },
  //详情
  start_talentdeil(e) {
    var id = e.currentTarget.dataset.id;
    app.navTo('../talentdeil/talentdeil?id' + id)
  },
  // 选择地址
  chose_city: function () {
    wx.navigateTo({
      url: '../address/address',
    })
  },
  //事件处理函数
  bindViewTap: function() {
 
  },
  //登录
  sendRequest: function (res) {
    var that = this;
    wx.request({
      url: ' ',
      data: {

      },
      method: ' ',
      success: function (res) {

      }
    })
  },
  /**
* 生命周期函数--监听页面显示
*/
  onShow: function () {
    let that = this
    if (!app.data.address.name) {
      wx.getLocation({
        type: 'gcj02',
        success: function (res) {
          console.log(res);
        },
      })
    }
    that.setData({
      city: app.data.address.name || "西安"
    })

  },
  onLoad: function () {
    //加载本页面的tabBar样式
    getApp().editTabBar();
  },
 
})
